home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11254 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 72 65 | 64 2e 77 65 65 67 2e 75 |Path: re|d.weeg.u|
|00000010| 69 6f 77 61 2e 65 64 75 | 21 72 6f 62 69 6e 73 6f |iowa.edu|!robinso|
|00000020| 6e 0a 46 72 6f 6d 3a 20 | 54 68 65 20 41 6d 6f 72 |n.From: |The Amor|
|00000030| 70 68 6f 75 73 20 4d 61 | 73 73 20 3c 72 6f 62 69 |phous Ma|ss <robi|
|00000040| 6e 73 6f 6e 40 62 6c 75 | 65 2e 77 65 65 67 2e 75 |nson@blu|e.weeg.u|
|00000050| 69 6f 77 61 2e 65 64 75 | 3e 0a 4e 65 77 73 67 72 |iowa.edu|>.Newsgr|
|00000060| 6f 75 70 73 3a 20 63 6f | 6d 70 2e 6c 61 6e 67 2e |oups: co|mp.lang.|
|00000070| 63 0a 53 75 62 6a 65 63 | 74 3a 20 52 65 3a 20 42 |c.Subjec|t: Re: B|
|00000080| 65 67 69 6e 65 72 20 43 | 20 70 6c 65 61 73 65 20 |eginer C| please |
|00000090| 68 65 6c 70 20 6d 65 0a | 44 61 74 65 3a 20 46 72 |help me.|Date: Fr|
|000000a0| 69 2c 20 32 32 20 4d 61 | 72 20 31 39 39 36 20 31 |i, 22 Ma|r 1996 1|
|000000b0| 34 3a 32 35 3a 35 39 20 | 2d 30 36 30 30 0a 4f 72 |4:25:59 |-0600.Or|
|000000c0| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 55 6e 69 76 |ganizati|on: Univ|
|000000d0| 65 72 73 69 74 79 20 6f | 66 20 49 6f 77 61 2c 20 |ersity o|f Iowa, |
|000000e0| 49 6f 77 61 20 43 69 74 | 79 2c 20 49 41 2c 20 55 |Iowa Cit|y, IA, U|
|000000f0| 53 41 0a 44 69 73 74 72 | 69 62 75 74 69 6f 6e 3a |SA.Distr|ibution:|
|00000100| 20 77 6f 72 6c 64 0a 4d | 65 73 73 61 67 65 2d 49 | world.M|essage-I|
|00000110| 44 3a 20 3c 50 69 6e 65 | 2e 41 33 32 2e 33 2e 39 |D: <Pine|.A32.3.9|
|00000120| 31 2e 39 36 30 33 32 32 | 31 34 31 38 31 30 2e 32 |1.960322|141810.2|
|00000130| 33 33 34 37 48 2d 31 30 | 30 30 30 30 40 72 65 64 |3347H-10|0000@red|
|00000140| 2e 77 65 65 67 2e 75 69 | 6f 77 61 2e 65 64 75 3e |.weeg.ui|owa.edu>|
|00000150| 0a 52 65 66 65 72 65 6e | 63 65 73 3a 20 3c 44 6f |.Referen|ces: <Do|
|00000160| 4c 43 46 78 2e 42 37 78 | 2e 30 2e 62 6c 6f 6f 72 |LCFx.B7x|.0.bloor|
|00000170| 40 74 6f 72 66 72 65 65 | 2e 6e 65 74 3e 20 3c 34 |@torfree|.net> <4|
|00000180| 69 72 73 32 35 24 63 36 | 6d 40 68 6f 70 70 65 72 |irs25$c6|m@hopper|
|00000190| 2e 61 63 6d 2e 6f 72 67 | 3e 0a 4e 4e 54 50 2d 50 |.acm.org|>.NNTP-P|
|000001a0| 6f 73 74 69 6e 67 2d 48 | 6f 73 74 3a 20 72 65 64 |osting-H|ost: red|
|000001b0| 2e 77 65 65 67 2e 75 69 | 6f 77 61 2e 65 64 75 0a |.weeg.ui|owa.edu.|
|000001c0| 4d 69 6d 65 2d 56 65 72 | 73 69 6f 6e 3a 20 31 2e |Mime-Ver|sion: 1.|
|000001d0| 30 0a 43 6f 6e 74 65 6e | 74 2d 54 79 70 65 3a 20 |0.Conten|t-Type: |
|000001e0| 54 45 58 54 2f 50 4c 41 | 49 4e 3b 20 63 68 61 72 |TEXT/PLA|IN; char|
|000001f0| 73 65 74 3d 55 53 2d 41 | 53 43 49 49 0a 58 2d 53 |set=US-A|SCII.X-S|
|00000200| 65 6e 64 65 72 3a 20 72 | 6f 62 69 6e 73 6f 6e 40 |ender: r|obinson@|
|00000210| 72 65 64 2e 77 65 65 67 | 2e 75 69 6f 77 61 2e 65 |red.weeg|.uiowa.e|
|00000220| 64 75 0a 49 6e 2d 52 65 | 70 6c 79 2d 54 6f 3a 20 |du.In-Re|ply-To: |
|00000230| 3c 34 69 72 73 32 35 24 | 63 36 6d 40 68 6f 70 70 |<4irs25$|c6m@hopp|
|00000240| 65 72 2e 61 63 6d 2e 6f | 72 67 3e 20 0a 0a 4f 6e |er.acm.o|rg> ..On|
|00000250| 20 32 31 20 4d 61 72 20 | 31 39 39 36 2c 20 4b 65 | 21 Mar |1996, Ke|
|00000260| 6e 20 56 61 72 6e 20 77 | 72 6f 74 65 3a 0a 0a 3e |n Varn w|rote:..>|
|00000270| 20 2f 3e 70 72 69 6e 74 | 66 20 28 22 6e 3d 20 20 | />print|f ("n= |
|00000280| 20 25 31 2e 33 66 5c 6e | 22 2c 20 6e 29 3b 0a 3e | %1.3f\n|", n);.>|
|00000290| 20 2f 3e 7d 0a 3e 20 2f | 3e 49 20 68 61 76 65 20 | />}.> /|>I have |
|000002a0| 63 6f 6d 70 6c 69 65 64 | 20 61 6e 64 20 72 75 6e |complied| and run|
|000002b0| 20 74 68 65 20 70 72 6f | 67 72 61 6d 6d 65 20 26 | the pro|gramme &|
|000002c0| 20 49 20 67 6f 74 20 74 | 68 65 20 61 6e 73 77 65 | I got t|he answe|
|000002d0| 72 20 6e 3d 31 2e 30 30 | 30 0a 3e 20 2f 3e 62 75 |r n=1.00|0.> />bu|
|000002e0| 74 20 49 61 6d 20 73 75 | 70 70 6f 73 65 64 20 74 |t Iam su|pposed t|
|000002f0| 6f 20 67 65 74 20 61 6e | 73 77 65 72 20 31 2e 38 |o get an|swer 1.8|
|00000300| 2e 0a 3e 20 2f 3e 57 68 | 79 20 49 20 67 6f 74 20 |..> />Wh|y I got |
|00000310| 74 68 69 73 20 61 6e 73 | 77 65 72 3f 0a 3e 20 0a |this ans|wer?.> .|
|00000320| 3e 20 59 6f 75 72 20 6d | 6f 64 69 66 69 65 72 73 |> Your m|odifiers|
|00000330| 20 6f 6e 20 74 68 65 20 | 25 66 20 61 72 65 20 69 | on the |%f are i|
|00000340| 6e 63 6f 72 72 65 63 74 | 2e 20 20 54 68 65 20 75 |ncorrect|. The u|
|00000350| 73 61 67 65 20 69 73 20 | 0a 3e 20 6d 69 6e 69 6d |sage is |.> minim|
|00000360| 75 6d 5f 77 69 64 74 68 | 2e 70 72 65 63 69 73 69 |um_width|.precisi|
|00000370| 6f 6e 2e 20 20 49 6e 20 | 6f 74 68 65 72 20 77 6f |on. In |other wo|
|00000380| 72 64 73 2c 20 79 6f 75 | 20 61 72 65 20 74 65 6c |rds, you| are tel|
|00000390| 6c 69 6e 67 20 70 72 69 | 6e 74 66 20 74 6f 20 70 |ling pri|ntf to p|
|000003a0| 72 69 6e 74 20 74 68 65 | 20 0a 3e 20 6e 75 6d 62 |rint the| .> numb|
|000003b0| 65 72 20 77 69 74 68 20 | 61 20 6d 69 6e 69 6d 75 |er with |a minimu|
|000003c0| 6d 20 6f 66 20 31 20 77 | 69 64 65 20 77 69 74 68 |m of 1 w|ide with|
|000003d0| 20 61 20 70 72 65 63 69 | 73 69 6f 6e 20 6f 66 20 | a preci|sion of |
|000003e0| 33 2e 20 20 53 69 6e 63 | 65 20 70 72 69 6e 74 66 |3. Sinc|e printf|
|000003f0| 20 64 6f 65 73 20 0a 3e | 20 72 6f 75 6e 64 69 6e | does .>| roundin|
|00000400| 67 2c 20 79 6f 75 72 20 | 72 65 73 75 6c 74 20 69 |g, your |result i|
|00000410| 73 20 31 2e 30 30 30 2e | 0a 0a 20 20 41 6e 64 20 |s 1.000.|.. And |
|00000420| 65 78 61 63 74 6c 79 20 | 68 6f 77 20 64 6f 65 73 |exactly |how does|
|00000430| 20 73 70 65 63 69 66 79 | 69 6e 67 20 61 20 5f 6d | specify|ing a _m|
|00000440| 69 6e 69 6d 75 6d 5f 20 | 77 69 64 74 68 20 66 6f |inimum_ |width fo|
|00000450| 72 63 65 20 22 72 6f 75 | 6e 64 69 6e 67 3f 22 0a |rce "rou|nding?".|
|00000460| 0a 3e 20 20 54 6f 20 63 | 6f 72 72 65 63 74 20 74 |.> To c|orrect t|
|00000470| 68 69 73 2c 20 75 73 65 | 20 25 33 2e 31 66 2e 20 |his, use| %3.1f. |
|00000480| 20 54 68 69 73 20 74 65 | 6c 6c 73 20 0a 3e 20 70 | This te|lls .> p|
|00000490| 72 69 6e 74 66 20 74 6f | 20 70 72 69 6e 74 20 61 |rintf to| print a|
|000004a0| 20 6d 69 6e 69 6d 75 6d | 20 6f 66 20 33 20 63 68 | minimum| of 3 ch|
|000004b0| 61 72 61 63 74 65 72 73 | 20 77 69 74 68 20 61 20 |aracters| with a |
|000004c0| 70 72 65 63 69 73 69 6f | 6e 20 6f 66 20 31 2e 0a |precisio|n of 1..|
|000004d0| 0a 20 20 57 68 61 74 3f | 21 0a 20 20 54 68 65 20 |. What?|!. The |
|000004e0| 66 6f 72 6d 61 74 20 73 | 70 65 63 69 66 69 65 72 |format s|pecifier|
|000004f0| 20 25 31 2e 33 66 20 73 | 70 65 63 69 66 69 65 73 | %1.3f s|pecifies|
|00000500| 20 61 20 66 6c 6f 61 74 | 20 61 74 20 6c 65 61 73 | a float| at leas|
|00000510| 74 20 31 20 63 68 61 72 | 61 63 74 65 72 20 77 69 |t 1 char|acter wi|
|00000520| 64 65 20 0a 77 69 74 68 | 20 61 20 6d 61 78 69 6d |de .with| a maxim|
|00000530| 75 6d 20 6f 66 20 74 68 | 72 65 65 20 63 68 61 72 |um of th|ree char|
|00000540| 61 63 74 65 72 73 20 61 | 66 74 65 72 20 74 68 65 |acters a|fter the|
|00000550| 20 70 65 72 69 6f 64 2e | 20 20 31 2e 33 34 35 2c | period.| 1.345,|
|00000560| 20 30 2e 30 30 31 2c 20 | 61 6e 64 20 0a 31 32 33 | 0.001, |and .123|
|00000570| 35 34 2e 30 30 30 20 61 | 72 65 20 61 6c 6c 20 70 |54.000 a|re all p|
|00000580| 6f 73 73 69 62 6c 65 20 | 72 65 73 75 6c 74 73 2e |ossible |results.|
|00000590| 20 20 54 68 65 20 70 72 | 6f 62 6c 65 6d 20 77 61 | The pr|oblem wa|
|000005a0| 73 20 74 68 61 74 20 74 | 68 65 20 70 65 72 73 6f |s that t|he perso|
|000005b0| 6e 20 77 61 73 20 0a 61 | 73 73 69 67 6e 69 6e 67 |n was .a|ssigning|
|000005c0| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 28 39 | the val|ue of (9|
|000005d0| 2f 35 29 20 74 6f 20 61 | 20 66 6c 6f 61 74 2e 20 |/5) to a| float. |
|000005e0| 20 53 69 6e 63 65 20 39 | 20 61 6e 64 20 35 20 61 | Since 9| and 5 a|
|000005f0| 72 65 20 69 6e 74 65 67 | 65 72 73 2c 20 74 68 65 |re integ|ers, the|
|00000600| 20 0a 72 65 73 75 6c 74 | 20 69 73 20 74 68 65 20 | .result| is the |
|00000610| 69 6e 74 65 67 65 72 20 | 31 2c 20 77 68 69 63 68 |integer |1, which|
|00000620| 20 69 73 20 63 6f 6e 76 | 65 72 74 65 64 20 74 6f | is conv|erted to|
|00000630| 20 31 2e 30 20 61 6e 64 | 20 61 73 73 69 67 6e 65 | 1.0 and| assigne|
|00000640| 64 20 74 6f 20 6e 2e 0a | 0a 2f 2a 2a 4a 61 6d 65 |d to n..|./**Jame|
|00000650| 73 20 52 6f 62 69 6e 73 | 6f 6e 2a 2a 2a 2a 2a 2a |s Robins|on******|
|00000660| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000670| 2a 20 20 20 20 20 20 20 | 20 20 20 20 20 0a 20 20 |* | . |
|00000680| 22 49 66 20 61 20 66 61 | 74 61 6c 20 65 72 72 6f |"If a fa|tal erro|
|00000690| 72 20 6f 63 63 75 72 73 | 2c 20 74 68 65 20 70 72 |r occurs|, the pr|
|000006a0| 6f 67 72 61 6d 20 73 68 | 6f 75 6c 64 20 6e 6f 74 |ogram sh|ould not|
|000006b0| 20 62 65 20 61 6c 6c 6f | 77 65 64 20 74 6f 20 63 | be allo|wed to c|
|000006c0| 6f 6e 74 69 6e 75 65 2e | 22 0a 20 2d 2d 20 4f 72 |ontinue.|". -- Or|
|000006d0| 61 63 6c 65 20 50 72 6f | 2a 43 20 55 73 65 72 27 |acle Pro|*C User'|
|000006e0| 73 20 47 75 69 64 65 20 | 20 20 20 20 20 20 20 20 |s Guide | |
|000006f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 6a 61 6d |********|*****jam|
|00000700| 65 73 2d 72 6f 62 69 6e | 73 6f 6e 40 75 69 6f 77 |es-robin|son@uiow|
|00000710| 61 2e 65 64 75 2a 2a 2f | 0a 0a 0a 0a 0a |a.edu**/|..... |
+--------+-------------------------+-------------------------+--------+--------+